<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "tb_courseissue".
 *
 * @property integer $issue_id
 * @property integer $course_id
 * @property string $name
 * @property string $issue
 * @property string $startDate
 * @property string $endDate
 * @property string $owner_id
 * @property string $auth_code
 * @property string $course_explain
 * @property string $explain_title
 * @property string $wap_url
 * @property integer $sales_num
 * @property string $study_group
 * @property string $custom_service
 * @property string $qq_url
 * @property string $wechat
 * @property string $banner_img
 * @property string $lupin_url
 * @property string $lupin_paw
 * @property string $issue_price
 * @property string $issue_costPrice
 * @property string $qun_number
 * @property string $ziliao_explain
 * @property string $qun_idkey
 * @property string $yy_number
 * @property string $yy_pwd
 * @property string $gift_cids
 */
class TbCourseissue extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tb_courseissue';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('passportdb');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['course_id', 'name', 'issue', 'startDate', 'endDate', 'owner_id', 'auth_code', 'course_explain', 'explain_title', 'wap_url', 'study_group', 'custom_service', 'qq_url', 'wechat', 'banner_img', 'issue_price', 'issue_costPrice', 'qun_idkey', 'yy_number', 'yy_pwd', 'gift_cids'], 'required'],
            [['course_id', 'sales_num'], 'integer'],
            [['startDate', 'endDate'], 'safe'],
            [['course_explain', 'ziliao_explain'], 'string'],
            [['issue_price', 'issue_costPrice'], 'number'],
            [['name', 'yy_number'], 'string', 'max' => 50],
            [['issue', 'auth_code'], 'string', 'max' => 10],
            [['owner_id'], 'string', 'max' => 64],
            [['explain_title', 'qun_number'], 'string', 'max' => 20],
            [['wap_url'], 'string', 'max' => 150],
            [['study_group', 'custom_service', 'qq_url', 'wechat', 'lupin_url', 'gift_cids'], 'string', 'max' => 300],
            [['banner_img'], 'string', 'max' => 200],
            [['lupin_paw'], 'string', 'max' => 30],
            [['qun_idkey'], 'string', 'max' => 100],
            [['yy_pwd'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'issue_id' => 'Issue ID',
            'course_id' => 'Course ID',
            'name' => 'Name',
            'issue' => 'Issue',
            'startDate' => 'Start Date',
            'endDate' => 'End Date',
            'owner_id' => 'Owner ID',
            'auth_code' => 'Auth Code',
            'course_explain' => 'Course Explain',
            'explain_title' => 'Explain Title',
            'wap_url' => 'Wap Url',
            'sales_num' => 'Sales Num',
            'study_group' => 'Study Group',
            'custom_service' => 'Custom Service',
            'qq_url' => 'Qq Url',
            'wechat' => 'Wechat',
            'banner_img' => 'Banner Img',
            'lupin_url' => 'Lupin Url',
            'lupin_paw' => 'Lupin Paw',
            'issue_price' => 'Issue Price',
            'issue_costPrice' => 'Issue Cost Price',
            'qun_number' => 'Qun Number',
            'ziliao_explain' => 'Ziliao Explain',
            'qun_idkey' => 'Qun Idkey',
            'yy_number' => 'Yy Number',
            'yy_pwd' => 'Yy Pwd',
            'gift_cids' => 'Gift Cids',
        ];
    }
}
